// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗  
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝  
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// -----------------------------------------------
//  
// This file is automatically generated 
// Please do not edit these files manually
// Run the following in the root of the repos:
//
// 		*NIX 		:	./build.sh codegen
// 		Windows 	:	build.bat codegen
//
// -----------------------------------------------
// ReSharper disable RedundantUsingDirective
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using Elasticsearch.Net;
using Elasticsearch.Net.Utf8Json;
using Elasticsearch.Net.Specification.MachineLearningApi;

// ReSharper disable RedundantBaseConstructorCall
// ReSharper disable UnusedTypeParameter
// ReSharper disable PartialMethodWithSinglePart
// ReSharper disable RedundantNameQualifier
namespace Nest
{
	///<summary>Descriptor for CloseJob <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-close-job.html</para></summary>
	public partial class CloseJobDescriptor : RequestDescriptorBase<CloseJobDescriptor, CloseJobRequestParameters, ICloseJobRequest>, ICloseJobRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningCloseJob;
		///<summary>/_ml/anomaly_detectors/{job_id}/_close</summary>
		///<param name = "jobId">this parameter is required</param>
		public CloseJobDescriptor(Id jobId): base(r => r.Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected CloseJobDescriptor(): base()
		{
		}

		// values part of the url path
		Id ICloseJobRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		// Request parameters
		///<summary>Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)</summary>		[Obsolete("Scheduled to be removed in 7.0, deprecated")]
		public CloseJobDescriptor AllowNoJobs(bool? allownojobs = true) => Qs("allow_no_jobs", allownojobs);
		///<summary>Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)</summary>
		public CloseJobDescriptor AllowNoMatch(bool? allownomatch = true) => Qs("allow_no_match", allownomatch);
		///<summary>True if the job should be forcefully closed</summary>
		public CloseJobDescriptor Force(bool? force = true) => Qs("force", force);
		///<summary>Controls the time to wait until a job has closed. Default to 30 minutes</summary>
		public CloseJobDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
	}

	///<summary>Descriptor for DeleteCalendar <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar.html</para></summary>
	public partial class DeleteCalendarDescriptor : RequestDescriptorBase<DeleteCalendarDescriptor, DeleteCalendarRequestParameters, IDeleteCalendarRequest>, IDeleteCalendarRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteCalendar;
		///<summary>/_ml/calendars/{calendar_id}</summary>
		///<param name = "calendarId">this parameter is required</param>
		public DeleteCalendarDescriptor(Id calendarId): base(r => r.Required("calendar_id", calendarId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected DeleteCalendarDescriptor(): base()
		{
		}

		// values part of the url path
		Id IDeleteCalendarRequest.CalendarId => Self.RouteValues.Get<Id>("calendar_id");
	// Request parameters
	}

	///<summary>Descriptor for DeleteCalendarEvent <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-event.html</para></summary>
	public partial class DeleteCalendarEventDescriptor : RequestDescriptorBase<DeleteCalendarEventDescriptor, DeleteCalendarEventRequestParameters, IDeleteCalendarEventRequest>, IDeleteCalendarEventRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteCalendarEvent;
		///<summary>/_ml/calendars/{calendar_id}/events/{event_id}</summary>
		///<param name = "calendarId">this parameter is required</param>
		///<param name = "eventId">this parameter is required</param>
		public DeleteCalendarEventDescriptor(Id calendarId, Id eventId): base(r => r.Required("calendar_id", calendarId).Required("event_id", eventId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected DeleteCalendarEventDescriptor(): base()
		{
		}

		// values part of the url path
		Id IDeleteCalendarEventRequest.CalendarId => Self.RouteValues.Get<Id>("calendar_id");
		Id IDeleteCalendarEventRequest.EventId => Self.RouteValues.Get<Id>("event_id");
	// Request parameters
	}

	///<summary>Descriptor for DeleteCalendarJob <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-calendar-job.html</para></summary>
	public partial class DeleteCalendarJobDescriptor : RequestDescriptorBase<DeleteCalendarJobDescriptor, DeleteCalendarJobRequestParameters, IDeleteCalendarJobRequest>, IDeleteCalendarJobRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteCalendarJob;
		///<summary>/_ml/calendars/{calendar_id}/jobs/{job_id}</summary>
		///<param name = "calendarId">this parameter is required</param>
		///<param name = "jobId">this parameter is required</param>
		public DeleteCalendarJobDescriptor(Id calendarId, Id jobId): base(r => r.Required("calendar_id", calendarId).Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected DeleteCalendarJobDescriptor(): base()
		{
		}

		// values part of the url path
		Id IDeleteCalendarJobRequest.CalendarId => Self.RouteValues.Get<Id>("calendar_id");
		Id IDeleteCalendarJobRequest.JobId => Self.RouteValues.Get<Id>("job_id");
	// Request parameters
	}

	///<summary>Descriptor for DeleteDatafeed <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-datafeed.html</para></summary>
	public partial class DeleteDatafeedDescriptor : RequestDescriptorBase<DeleteDatafeedDescriptor, DeleteDatafeedRequestParameters, IDeleteDatafeedRequest>, IDeleteDatafeedRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteDatafeed;
		///<summary>/_ml/datafeeds/{datafeed_id}</summary>
		///<param name = "datafeedId">this parameter is required</param>
		public DeleteDatafeedDescriptor(Id datafeedId): base(r => r.Required("datafeed_id", datafeedId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected DeleteDatafeedDescriptor(): base()
		{
		}

		// values part of the url path
		Id IDeleteDatafeedRequest.DatafeedId => Self.RouteValues.Get<Id>("datafeed_id");
		// Request parameters
		///<summary>True if the datafeed should be forcefully deleted</summary>
		public DeleteDatafeedDescriptor Force(bool? force = true) => Qs("force", force);
	}

	///<summary>Descriptor for DeleteExpiredData <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-expired-data.html</para></summary>
	public partial class DeleteExpiredDataDescriptor : RequestDescriptorBase<DeleteExpiredDataDescriptor, DeleteExpiredDataRequestParameters, IDeleteExpiredDataRequest>, IDeleteExpiredDataRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteExpiredData;
		///<summary>/_ml/_delete_expired_data/{job_id}</summary>
		///<param name = "jobId">Optional, accepts null</param>
		public DeleteExpiredDataDescriptor(Id jobId): base(r => r.Optional("job_id", jobId))
		{
		}

		///<summary>/_ml/_delete_expired_data</summary>
		public DeleteExpiredDataDescriptor(): base()
		{
		}

		// values part of the url path
		Id IDeleteExpiredDataRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		///<summary>The ID of the job(s) to perform expired data hygiene for</summary>
		public DeleteExpiredDataDescriptor JobId(Id jobId) => Assign(jobId, (a, v) => a.RouteValues.Optional("job_id", v));
		// Request parameters
		///<summary>The desired requests per second for the deletion processes.</summary>
		public DeleteExpiredDataDescriptor RequestsPerSecond(long? requestspersecond) => Qs("requests_per_second", requestspersecond);
		///<summary>How long can the underlying delete processes run until they are canceled</summary>
		public DeleteExpiredDataDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
	}

	///<summary>Descriptor for DeleteFilter <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-filter.html</para></summary>
	public partial class DeleteFilterDescriptor : RequestDescriptorBase<DeleteFilterDescriptor, DeleteFilterRequestParameters, IDeleteFilterRequest>, IDeleteFilterRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteFilter;
		///<summary>/_ml/filters/{filter_id}</summary>
		///<param name = "filterId">this parameter is required</param>
		public DeleteFilterDescriptor(Id filterId): base(r => r.Required("filter_id", filterId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected DeleteFilterDescriptor(): base()
		{
		}

		// values part of the url path
		Id IDeleteFilterRequest.FilterId => Self.RouteValues.Get<Id>("filter_id");
	// Request parameters
	}

	///<summary>Descriptor for DeleteForecast <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-forecast.html</para></summary>
	public partial class DeleteForecastDescriptor : RequestDescriptorBase<DeleteForecastDescriptor, DeleteForecastRequestParameters, IDeleteForecastRequest>, IDeleteForecastRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteForecast;
		///<summary>/_ml/anomaly_detectors/{job_id}/_forecast/{forecast_id}</summary>
		///<param name = "jobId">this parameter is required</param>
		///<param name = "forecastId">this parameter is required</param>
		public DeleteForecastDescriptor(Id jobId, Ids forecastId): base(r => r.Required("job_id", jobId).Required("forecast_id", forecastId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected DeleteForecastDescriptor(): base()
		{
		}

		// values part of the url path
		Id IDeleteForecastRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		Ids IDeleteForecastRequest.ForecastId => Self.RouteValues.Get<Ids>("forecast_id");
		// Request parameters
		///<summary>Whether to ignore if `_all` matches no forecasts</summary>
		public DeleteForecastDescriptor AllowNoForecasts(bool? allownoforecasts = true) => Qs("allow_no_forecasts", allownoforecasts);
		///<summary>Controls the time to wait until the forecast(s) are deleted. Default to 30 seconds</summary>
		public DeleteForecastDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
	}

	///<summary>Descriptor for DeleteJob <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-job.html</para></summary>
	public partial class DeleteJobDescriptor : RequestDescriptorBase<DeleteJobDescriptor, DeleteJobRequestParameters, IDeleteJobRequest>, IDeleteJobRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteJob;
		///<summary>/_ml/anomaly_detectors/{job_id}</summary>
		///<param name = "jobId">this parameter is required</param>
		public DeleteJobDescriptor(Id jobId): base(r => r.Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected DeleteJobDescriptor(): base()
		{
		}

		// values part of the url path
		Id IDeleteJobRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		// Request parameters
		///<summary>True if the job should be forcefully deleted</summary>
		public DeleteJobDescriptor Force(bool? force = true) => Qs("force", force);
		///<summary>Should this request wait until the operation has completed before returning</summary>
		public DeleteJobDescriptor WaitForCompletion(bool? waitforcompletion = true) => Qs("wait_for_completion", waitforcompletion);
	}

	///<summary>Descriptor for DeleteModelSnapshot <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-delete-snapshot.html</para></summary>
	public partial class DeleteModelSnapshotDescriptor : RequestDescriptorBase<DeleteModelSnapshotDescriptor, DeleteModelSnapshotRequestParameters, IDeleteModelSnapshotRequest>, IDeleteModelSnapshotRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningDeleteModelSnapshot;
		///<summary>/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}</summary>
		///<param name = "jobId">this parameter is required</param>
		///<param name = "snapshotId">this parameter is required</param>
		public DeleteModelSnapshotDescriptor(Id jobId, Id snapshotId): base(r => r.Required("job_id", jobId).Required("snapshot_id", snapshotId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected DeleteModelSnapshotDescriptor(): base()
		{
		}

		// values part of the url path
		Id IDeleteModelSnapshotRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		Id IDeleteModelSnapshotRequest.SnapshotId => Self.RouteValues.Get<Id>("snapshot_id");
	// Request parameters
	}

	///<summary>Descriptor for EstimateModelMemory <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-apis.html</para></summary>
	public partial class EstimateModelMemoryDescriptor<TDocument> : RequestDescriptorBase<EstimateModelMemoryDescriptor<TDocument>, EstimateModelMemoryRequestParameters, IEstimateModelMemoryRequest>, IEstimateModelMemoryRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningEstimateModelMemory;
	// values part of the url path
	// Request parameters
	}

	///<summary>Descriptor for FlushJob <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-flush-job.html</para></summary>
	public partial class FlushJobDescriptor : RequestDescriptorBase<FlushJobDescriptor, FlushJobRequestParameters, IFlushJobRequest>, IFlushJobRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningFlushJob;
		///<summary>/_ml/anomaly_detectors/{job_id}/_flush</summary>
		///<param name = "jobId">this parameter is required</param>
		public FlushJobDescriptor(Id jobId): base(r => r.Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected FlushJobDescriptor(): base()
		{
		}

		// values part of the url path
		Id IFlushJobRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		// Request parameters
		///<summary>Skips time to the given value without generating results or updating the model for the skipped interval</summary>
		public FlushJobDescriptor SkipTime(string skiptime) => Qs("skip_time", skiptime);
	}

	///<summary>Descriptor for ForecastJob <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-forecast.html</para></summary>
	public partial class ForecastJobDescriptor : RequestDescriptorBase<ForecastJobDescriptor, ForecastJobRequestParameters, IForecastJobRequest>, IForecastJobRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningForecastJob;
		///<summary>/_ml/anomaly_detectors/{job_id}/_forecast</summary>
		///<param name = "jobId">this parameter is required</param>
		public ForecastJobDescriptor(Id jobId): base(r => r.Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected ForecastJobDescriptor(): base()
		{
		}

		// values part of the url path
		Id IForecastJobRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		// Request parameters
		///<summary>The max memory able to be used by the forecast. Default is 20mb.</summary>
		public ForecastJobDescriptor MaxModelMemory(string maxmodelmemory) => Qs("max_model_memory", maxmodelmemory);
	}

	///<summary>Descriptor for GetBuckets <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-bucket.html</para></summary>
	public partial class GetBucketsDescriptor : RequestDescriptorBase<GetBucketsDescriptor, GetBucketsRequestParameters, IGetBucketsRequest>, IGetBucketsRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetBuckets;
		///<summary>/_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}</summary>
		///<param name = "jobId">this parameter is required</param>
		///<param name = "timestamp">Optional, accepts null</param>
		public GetBucketsDescriptor(Id jobId, Timestamp timestamp): base(r => r.Required("job_id", jobId).Optional("timestamp", timestamp))
		{
		}

		///<summary>/_ml/anomaly_detectors/{job_id}/results/buckets</summary>
		///<param name = "jobId">this parameter is required</param>
		public GetBucketsDescriptor(Id jobId): base(r => r.Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected GetBucketsDescriptor(): base()
		{
		}

		// values part of the url path
		Id IGetBucketsRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		Timestamp IGetBucketsRequest.Timestamp => Self.RouteValues.Get<Timestamp>("timestamp");
		///<summary>The timestamp of the desired single bucket result</summary>
		public GetBucketsDescriptor Timestamp(Timestamp timestamp) => Assign(timestamp, (a, v) => a.RouteValues.Optional("timestamp", v));
	// Request parameters
	}

	///<summary>Descriptor for GetCalendarEvents <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar-event.html</para></summary>
	public partial class GetCalendarEventsDescriptor : RequestDescriptorBase<GetCalendarEventsDescriptor, GetCalendarEventsRequestParameters, IGetCalendarEventsRequest>, IGetCalendarEventsRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetCalendarEvents;
		///<summary>/_ml/calendars/{calendar_id}/events</summary>
		///<param name = "calendarId">this parameter is required</param>
		public GetCalendarEventsDescriptor(Id calendarId): base(r => r.Required("calendar_id", calendarId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected GetCalendarEventsDescriptor(): base()
		{
		}

		// values part of the url path
		Id IGetCalendarEventsRequest.CalendarId => Self.RouteValues.Get<Id>("calendar_id");
		// Request parameters
		///<summary>Get events before this time</summary>
		public GetCalendarEventsDescriptor End(DateTimeOffset? end) => Qs("end", end);
		///<summary>Get events for the job. When this option is used calendar_id must be '_all'</summary>
		public GetCalendarEventsDescriptor JobId(string jobid) => Qs("job_id", jobid);
		///<summary>Get events after this time</summary>
		public GetCalendarEventsDescriptor Start(string start) => Qs("start", start);
	}

	///<summary>Descriptor for GetCalendars <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-calendar.html</para></summary>
	public partial class GetCalendarsDescriptor : RequestDescriptorBase<GetCalendarsDescriptor, GetCalendarsRequestParameters, IGetCalendarsRequest>, IGetCalendarsRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetCalendars;
		///<summary>/_ml/calendars</summary>
		public GetCalendarsDescriptor(): base()
		{
		}

		///<summary>/_ml/calendars/{calendar_id}</summary>
		///<param name = "calendarId">Optional, accepts null</param>
		public GetCalendarsDescriptor(Id calendarId): base(r => r.Optional("calendar_id", calendarId))
		{
		}

		// values part of the url path
		Id IGetCalendarsRequest.CalendarId => Self.RouteValues.Get<Id>("calendar_id");
		///<summary>The ID of the calendar to fetch</summary>
		public GetCalendarsDescriptor CalendarId(Id calendarId) => Assign(calendarId, (a, v) => a.RouteValues.Optional("calendar_id", v));
	// Request parameters
	}

	///<summary>Descriptor for GetCategories <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-category.html</para></summary>
	public partial class GetCategoriesDescriptor : RequestDescriptorBase<GetCategoriesDescriptor, GetCategoriesRequestParameters, IGetCategoriesRequest>, IGetCategoriesRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetCategories;
		///<summary>/_ml/anomaly_detectors/{job_id}/results/categories/{category_id}</summary>
		///<param name = "jobId">this parameter is required</param>
		///<param name = "categoryId">Optional, accepts null</param>
		public GetCategoriesDescriptor(Id jobId, LongId categoryId): base(r => r.Required("job_id", jobId).Optional("category_id", categoryId))
		{
		}

		///<summary>/_ml/anomaly_detectors/{job_id}/results/categories/</summary>
		///<param name = "jobId">this parameter is required</param>
		public GetCategoriesDescriptor(Id jobId): base(r => r.Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected GetCategoriesDescriptor(): base()
		{
		}

		// values part of the url path
		Id IGetCategoriesRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		LongId IGetCategoriesRequest.CategoryId => Self.RouteValues.Get<LongId>("category_id");
		///<summary>The identifier of the category definition of interest</summary>
		public GetCategoriesDescriptor CategoryId(LongId categoryId) => Assign(categoryId, (a, v) => a.RouteValues.Optional("category_id", v));
		// Request parameters
		///<summary>Specifies the partition to retrieve categories for. This is optional, and should never be used for jobs where per-partition categorization is disabled.</summary>
		public GetCategoriesDescriptor PartitionFieldValue(Field partitionfieldvalue) => Qs("partition_field_value", partitionfieldvalue);
		///<summary>Specifies the partition to retrieve categories for. This is optional, and should never be used for jobs where per-partition categorization is disabled.</summary>
		public GetCategoriesDescriptor PartitionFieldValue<T>(Expression<Func<T, object>> field)
			where T : class => Qs("partition_field_value", (Field)field);
	}

	///<summary>Descriptor for GetDatafeedStats <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed-stats.html</para></summary>
	public partial class GetDatafeedStatsDescriptor : RequestDescriptorBase<GetDatafeedStatsDescriptor, GetDatafeedStatsRequestParameters, IGetDatafeedStatsRequest>, IGetDatafeedStatsRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetDatafeedStats;
		///<summary>/_ml/datafeeds/{datafeed_id}/_stats</summary>
		///<param name = "datafeedId">Optional, accepts null</param>
		public GetDatafeedStatsDescriptor(Id datafeedId): base(r => r.Optional("datafeed_id", datafeedId))
		{
		}

		///<summary>/_ml/datafeeds/_stats</summary>
		public GetDatafeedStatsDescriptor(): base()
		{
		}

		// values part of the url path
		Id IGetDatafeedStatsRequest.DatafeedId => Self.RouteValues.Get<Id>("datafeed_id");
		///<summary>The ID of the datafeeds stats to fetch</summary>
		public GetDatafeedStatsDescriptor DatafeedId(Id datafeedId) => Assign(datafeedId, (a, v) => a.RouteValues.Optional("datafeed_id", v));
		// Request parameters
		///<summary>Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)</summary>		[Obsolete("Scheduled to be removed in 7.0, deprecated")]
		public GetDatafeedStatsDescriptor AllowNoDatafeeds(bool? allownodatafeeds = true) => Qs("allow_no_datafeeds", allownodatafeeds);
		///<summary>Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)</summary>
		public GetDatafeedStatsDescriptor AllowNoMatch(bool? allownomatch = true) => Qs("allow_no_match", allownomatch);
	}

	///<summary>Descriptor for GetDatafeeds <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-datafeed.html</para></summary>
	public partial class GetDatafeedsDescriptor : RequestDescriptorBase<GetDatafeedsDescriptor, GetDatafeedsRequestParameters, IGetDatafeedsRequest>, IGetDatafeedsRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetDatafeeds;
		///<summary>/_ml/datafeeds/{datafeed_id}</summary>
		///<param name = "datafeedId">Optional, accepts null</param>
		public GetDatafeedsDescriptor(Id datafeedId): base(r => r.Optional("datafeed_id", datafeedId))
		{
		}

		///<summary>/_ml/datafeeds</summary>
		public GetDatafeedsDescriptor(): base()
		{
		}

		// values part of the url path
		Id IGetDatafeedsRequest.DatafeedId => Self.RouteValues.Get<Id>("datafeed_id");
		///<summary>The ID of the datafeeds to fetch</summary>
		public GetDatafeedsDescriptor DatafeedId(Id datafeedId) => Assign(datafeedId, (a, v) => a.RouteValues.Optional("datafeed_id", v));
		// Request parameters
		///<summary>Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)</summary>		[Obsolete("Scheduled to be removed in 7.0, deprecated")]
		public GetDatafeedsDescriptor AllowNoDatafeeds(bool? allownodatafeeds = true) => Qs("allow_no_datafeeds", allownodatafeeds);
		///<summary>Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)</summary>
		public GetDatafeedsDescriptor AllowNoMatch(bool? allownomatch = true) => Qs("allow_no_match", allownomatch);
	}

	///<summary>Descriptor for GetFilters <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-filter.html</para></summary>
	public partial class GetFiltersDescriptor : RequestDescriptorBase<GetFiltersDescriptor, GetFiltersRequestParameters, IGetFiltersRequest>, IGetFiltersRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetFilters;
		///<summary>/_ml/filters</summary>
		public GetFiltersDescriptor(): base()
		{
		}

		///<summary>/_ml/filters/{filter_id}</summary>
		///<param name = "filterId">Optional, accepts null</param>
		public GetFiltersDescriptor(Id filterId): base(r => r.Optional("filter_id", filterId))
		{
		}

		// values part of the url path
		Id IGetFiltersRequest.FilterId => Self.RouteValues.Get<Id>("filter_id");
		///<summary>The ID of the filter to fetch</summary>
		public GetFiltersDescriptor FilterId(Id filterId) => Assign(filterId, (a, v) => a.RouteValues.Optional("filter_id", v));
		// Request parameters
		///<summary>skips a number of filters</summary>
		public GetFiltersDescriptor From(int? from) => Qs("from", from);
		///<summary>specifies a max number of filters to get</summary>
		public GetFiltersDescriptor Size(int? size) => Qs("size", size);
	}

	///<summary>Descriptor for GetInfluencers <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-influencer.html</para></summary>
	public partial class GetInfluencersDescriptor : RequestDescriptorBase<GetInfluencersDescriptor, GetInfluencersRequestParameters, IGetInfluencersRequest>, IGetInfluencersRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetInfluencers;
		///<summary>/_ml/anomaly_detectors/{job_id}/results/influencers</summary>
		///<param name = "jobId">this parameter is required</param>
		public GetInfluencersDescriptor(Id jobId): base(r => r.Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected GetInfluencersDescriptor(): base()
		{
		}

		// values part of the url path
		Id IGetInfluencersRequest.JobId => Self.RouteValues.Get<Id>("job_id");
	// Request parameters
	}

	///<summary>Descriptor for GetJobStats <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job-stats.html</para></summary>
	public partial class GetJobStatsDescriptor : RequestDescriptorBase<GetJobStatsDescriptor, GetJobStatsRequestParameters, IGetJobStatsRequest>, IGetJobStatsRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetJobStats;
		///<summary>/_ml/anomaly_detectors/_stats</summary>
		public GetJobStatsDescriptor(): base()
		{
		}

		///<summary>/_ml/anomaly_detectors/{job_id}/_stats</summary>
		///<param name = "jobId">Optional, accepts null</param>
		public GetJobStatsDescriptor(Id jobId): base(r => r.Optional("job_id", jobId))
		{
		}

		// values part of the url path
		Id IGetJobStatsRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		///<summary>The ID of the jobs stats to fetch</summary>
		public GetJobStatsDescriptor JobId(Id jobId) => Assign(jobId, (a, v) => a.RouteValues.Optional("job_id", v));
		// Request parameters
		///<summary>Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)</summary>		[Obsolete("Scheduled to be removed in 7.0, deprecated")]
		public GetJobStatsDescriptor AllowNoJobs(bool? allownojobs = true) => Qs("allow_no_jobs", allownojobs);
		///<summary>Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)</summary>
		public GetJobStatsDescriptor AllowNoMatch(bool? allownomatch = true) => Qs("allow_no_match", allownomatch);
	}

	///<summary>Descriptor for GetJobs <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-job.html</para></summary>
	public partial class GetJobsDescriptor : RequestDescriptorBase<GetJobsDescriptor, GetJobsRequestParameters, IGetJobsRequest>, IGetJobsRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetJobs;
		///<summary>/_ml/anomaly_detectors/{job_id}</summary>
		///<param name = "jobId">Optional, accepts null</param>
		public GetJobsDescriptor(Id jobId): base(r => r.Optional("job_id", jobId))
		{
		}

		///<summary>/_ml/anomaly_detectors</summary>
		public GetJobsDescriptor(): base()
		{
		}

		// values part of the url path
		Id IGetJobsRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		///<summary>The ID of the jobs to fetch</summary>
		public GetJobsDescriptor JobId(Id jobId) => Assign(jobId, (a, v) => a.RouteValues.Optional("job_id", v));
		// Request parameters
		///<summary>Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)</summary>		[Obsolete("Scheduled to be removed in 7.0, deprecated")]
		public GetJobsDescriptor AllowNoJobs(bool? allownojobs = true) => Qs("allow_no_jobs", allownojobs);
		///<summary>Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)</summary>
		public GetJobsDescriptor AllowNoMatch(bool? allownomatch = true) => Qs("allow_no_match", allownomatch);
	}

	///<summary>Descriptor for GetModelSnapshots <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-snapshot.html</para></summary>
	public partial class GetModelSnapshotsDescriptor : RequestDescriptorBase<GetModelSnapshotsDescriptor, GetModelSnapshotsRequestParameters, IGetModelSnapshotsRequest>, IGetModelSnapshotsRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetModelSnapshots;
		///<summary>/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}</summary>
		///<param name = "jobId">this parameter is required</param>
		///<param name = "snapshotId">Optional, accepts null</param>
		public GetModelSnapshotsDescriptor(Id jobId, Id snapshotId): base(r => r.Required("job_id", jobId).Optional("snapshot_id", snapshotId))
		{
		}

		///<summary>/_ml/anomaly_detectors/{job_id}/model_snapshots</summary>
		///<param name = "jobId">this parameter is required</param>
		public GetModelSnapshotsDescriptor(Id jobId): base(r => r.Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected GetModelSnapshotsDescriptor(): base()
		{
		}

		// values part of the url path
		Id IGetModelSnapshotsRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		Id IGetModelSnapshotsRequest.SnapshotId => Self.RouteValues.Get<Id>("snapshot_id");
		///<summary>The ID of the snapshot to fetch</summary>
		public GetModelSnapshotsDescriptor SnapshotId(Id snapshotId) => Assign(snapshotId, (a, v) => a.RouteValues.Optional("snapshot_id", v));
	// Request parameters
	}

	///<summary>Descriptor for GetOverallBuckets <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-overall-buckets.html</para></summary>
	public partial class GetOverallBucketsDescriptor : RequestDescriptorBase<GetOverallBucketsDescriptor, GetOverallBucketsRequestParameters, IGetOverallBucketsRequest>, IGetOverallBucketsRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetOverallBuckets;
		///<summary>/_ml/anomaly_detectors/{job_id}/results/overall_buckets</summary>
		///<param name = "jobId">this parameter is required</param>
		public GetOverallBucketsDescriptor(Id jobId): base(r => r.Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected GetOverallBucketsDescriptor(): base()
		{
		}

		// values part of the url path
		Id IGetOverallBucketsRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		// Request parameters
		///<summary>Whether to ignore if a wildcard expression matches no jobs. (This includes `_all` string or when no jobs have been specified)</summary>
		public GetOverallBucketsDescriptor AllowNoMatch(bool? allownomatch = true) => Qs("allow_no_match", allownomatch);
	}

	///<summary>Descriptor for GetAnomalyRecords <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-get-record.html</para></summary>
	public partial class GetAnomalyRecordsDescriptor : RequestDescriptorBase<GetAnomalyRecordsDescriptor, GetAnomalyRecordsRequestParameters, IGetAnomalyRecordsRequest>, IGetAnomalyRecordsRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningGetAnomalyRecords;
		///<summary>/_ml/anomaly_detectors/{job_id}/results/records</summary>
		///<param name = "jobId">this parameter is required</param>
		public GetAnomalyRecordsDescriptor(Id jobId): base(r => r.Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected GetAnomalyRecordsDescriptor(): base()
		{
		}

		// values part of the url path
		Id IGetAnomalyRecordsRequest.JobId => Self.RouteValues.Get<Id>("job_id");
	// Request parameters
	}

	///<summary>Descriptor for Info <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/get-ml-info.html</para></summary>
	public partial class MachineLearningInfoDescriptor : RequestDescriptorBase<MachineLearningInfoDescriptor, MachineLearningInfoRequestParameters, IMachineLearningInfoRequest>, IMachineLearningInfoRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningInfo;
	// values part of the url path
	// Request parameters
	}

	///<summary>Descriptor for OpenJob <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-open-job.html</para></summary>
	public partial class OpenJobDescriptor : RequestDescriptorBase<OpenJobDescriptor, OpenJobRequestParameters, IOpenJobRequest>, IOpenJobRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningOpenJob;
		///<summary>/_ml/anomaly_detectors/{job_id}/_open</summary>
		///<param name = "jobId">this parameter is required</param>
		public OpenJobDescriptor(Id jobId): base(r => r.Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected OpenJobDescriptor(): base()
		{
		}

		// values part of the url path
		Id IOpenJobRequest.JobId => Self.RouteValues.Get<Id>("job_id");
	// Request parameters
	}

	///<summary>Descriptor for PostCalendarEvents <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-calendar-event.html</para></summary>
	public partial class PostCalendarEventsDescriptor : RequestDescriptorBase<PostCalendarEventsDescriptor, PostCalendarEventsRequestParameters, IPostCalendarEventsRequest>, IPostCalendarEventsRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPostCalendarEvents;
		///<summary>/_ml/calendars/{calendar_id}/events</summary>
		///<param name = "calendarId">this parameter is required</param>
		public PostCalendarEventsDescriptor(Id calendarId): base(r => r.Required("calendar_id", calendarId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected PostCalendarEventsDescriptor(): base()
		{
		}

		// values part of the url path
		Id IPostCalendarEventsRequest.CalendarId => Self.RouteValues.Get<Id>("calendar_id");
	// Request parameters
	}

	///<summary>Descriptor for PostJobData <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-post-data.html</para></summary>
	public partial class PostJobDataDescriptor : RequestDescriptorBase<PostJobDataDescriptor, PostJobDataRequestParameters, IPostJobDataRequest>, IPostJobDataRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPostJobData;
		///<summary>/_ml/anomaly_detectors/{job_id}/_data</summary>
		///<param name = "jobId">this parameter is required</param>
		public PostJobDataDescriptor(Id jobId): base(r => r.Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected PostJobDataDescriptor(): base()
		{
		}

		// values part of the url path
		Id IPostJobDataRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		// Request parameters
		///<summary>Optional parameter to specify the end of the bucket resetting range</summary>
		public PostJobDataDescriptor ResetEnd(DateTimeOffset? resetend) => Qs("reset_end", resetend);
		///<summary>Optional parameter to specify the start of the bucket resetting range</summary>
		public PostJobDataDescriptor ResetStart(DateTimeOffset? resetstart) => Qs("reset_start", resetstart);
	}

	///<summary>Descriptor for PreviewDatafeed <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-preview-datafeed.html</para></summary>
	public partial class PreviewDatafeedDescriptor : RequestDescriptorBase<PreviewDatafeedDescriptor, PreviewDatafeedRequestParameters, IPreviewDatafeedRequest>, IPreviewDatafeedRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPreviewDatafeed;
		///<summary>/_ml/datafeeds/{datafeed_id}/_preview</summary>
		///<param name = "datafeedId">this parameter is required</param>
		public PreviewDatafeedDescriptor(Id datafeedId): base(r => r.Required("datafeed_id", datafeedId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected PreviewDatafeedDescriptor(): base()
		{
		}

		// values part of the url path
		Id IPreviewDatafeedRequest.DatafeedId => Self.RouteValues.Get<Id>("datafeed_id");
	// Request parameters
	}

	///<summary>Descriptor for PutCalendar <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar.html</para></summary>
	public partial class PutCalendarDescriptor : RequestDescriptorBase<PutCalendarDescriptor, PutCalendarRequestParameters, IPutCalendarRequest>, IPutCalendarRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPutCalendar;
		///<summary>/_ml/calendars/{calendar_id}</summary>
		///<param name = "calendarId">this parameter is required</param>
		public PutCalendarDescriptor(Id calendarId): base(r => r.Required("calendar_id", calendarId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected PutCalendarDescriptor(): base()
		{
		}

		// values part of the url path
		Id IPutCalendarRequest.CalendarId => Self.RouteValues.Get<Id>("calendar_id");
	// Request parameters
	}

	///<summary>Descriptor for PutCalendarJob <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-calendar-job.html</para></summary>
	public partial class PutCalendarJobDescriptor : RequestDescriptorBase<PutCalendarJobDescriptor, PutCalendarJobRequestParameters, IPutCalendarJobRequest>, IPutCalendarJobRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPutCalendarJob;
		///<summary>/_ml/calendars/{calendar_id}/jobs/{job_id}</summary>
		///<param name = "calendarId">this parameter is required</param>
		///<param name = "jobId">this parameter is required</param>
		public PutCalendarJobDescriptor(Id calendarId, Id jobId): base(r => r.Required("calendar_id", calendarId).Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected PutCalendarJobDescriptor(): base()
		{
		}

		// values part of the url path
		Id IPutCalendarJobRequest.CalendarId => Self.RouteValues.Get<Id>("calendar_id");
		Id IPutCalendarJobRequest.JobId => Self.RouteValues.Get<Id>("job_id");
	// Request parameters
	}

	///<summary>Descriptor for PutDatafeed <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-datafeed.html</para></summary>
	public partial class PutDatafeedDescriptor<TDocument> : RequestDescriptorBase<PutDatafeedDescriptor<TDocument>, PutDatafeedRequestParameters, IPutDatafeedRequest>, IPutDatafeedRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPutDatafeed;
		///<summary>/_ml/datafeeds/{datafeed_id}</summary>
		///<param name = "datafeedId">this parameter is required</param>
		public PutDatafeedDescriptor(Id datafeedId): base(r => r.Required("datafeed_id", datafeedId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected PutDatafeedDescriptor(): base()
		{
		}

		// values part of the url path
		Id IPutDatafeedRequest.DatafeedId => Self.RouteValues.Get<Id>("datafeed_id");
		// Request parameters
		///<summary>Ignore if the source indices expressions resolves to no concrete indices (default: true)</summary>
		public PutDatafeedDescriptor<TDocument> AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
		///<summary>Whether source index expressions should get expanded to open or closed indices (default: open)</summary>
		public PutDatafeedDescriptor<TDocument> ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
		///<summary>Ignore indices that are marked as throttled (default: true)</summary>
		public PutDatafeedDescriptor<TDocument> IgnoreThrottled(bool? ignorethrottled = true) => Qs("ignore_throttled", ignorethrottled);
		///<summary>Ignore unavailable indexes (default: false)</summary>
		public PutDatafeedDescriptor<TDocument> IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
	}

	///<summary>Descriptor for PutFilter <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-filter.html</para></summary>
	public partial class PutFilterDescriptor : RequestDescriptorBase<PutFilterDescriptor, PutFilterRequestParameters, IPutFilterRequest>, IPutFilterRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPutFilter;
		///<summary>/_ml/filters/{filter_id}</summary>
		///<param name = "filterId">this parameter is required</param>
		public PutFilterDescriptor(Id filterId): base(r => r.Required("filter_id", filterId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected PutFilterDescriptor(): base()
		{
		}

		// values part of the url path
		Id IPutFilterRequest.FilterId => Self.RouteValues.Get<Id>("filter_id");
	// Request parameters
	}

	///<summary>Descriptor for PutJob <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-put-job.html</para></summary>
	public partial class PutJobDescriptor<TDocument> : RequestDescriptorBase<PutJobDescriptor<TDocument>, PutJobRequestParameters, IPutJobRequest>, IPutJobRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningPutJob;
		///<summary>/_ml/anomaly_detectors/{job_id}</summary>
		///<param name = "jobId">this parameter is required</param>
		public PutJobDescriptor(Id jobId): base(r => r.Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected PutJobDescriptor(): base()
		{
		}

		// values part of the url path
		Id IPutJobRequest.JobId => Self.RouteValues.Get<Id>("job_id");
	// Request parameters
	}

	///<summary>Descriptor for RevertModelSnapshot <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-revert-snapshot.html</para></summary>
	public partial class RevertModelSnapshotDescriptor : RequestDescriptorBase<RevertModelSnapshotDescriptor, RevertModelSnapshotRequestParameters, IRevertModelSnapshotRequest>, IRevertModelSnapshotRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningRevertModelSnapshot;
		///<summary>/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_revert</summary>
		///<param name = "jobId">this parameter is required</param>
		///<param name = "snapshotId">this parameter is required</param>
		public RevertModelSnapshotDescriptor(Id jobId, Id snapshotId): base(r => r.Required("job_id", jobId).Required("snapshot_id", snapshotId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected RevertModelSnapshotDescriptor(): base()
		{
		}

		// values part of the url path
		Id IRevertModelSnapshotRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		Id IRevertModelSnapshotRequest.SnapshotId => Self.RouteValues.Get<Id>("snapshot_id");
	// Request parameters
	}

	///<summary>Descriptor for SetUpgradeMode <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-set-upgrade-mode.html</para></summary>
	public partial class SetUpgradeModeDescriptor : RequestDescriptorBase<SetUpgradeModeDescriptor, SetUpgradeModeRequestParameters, ISetUpgradeModeRequest>, ISetUpgradeModeRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningSetUpgradeMode;
		// values part of the url path
		// Request parameters
		///<summary>Whether to enable upgrade_mode ML setting or not. Defaults to false.</summary>
		public SetUpgradeModeDescriptor Enabled(bool? enabled = true) => Qs("enabled", enabled);
		///<summary>Controls the time to wait before action times out. Defaults to 30 seconds</summary>
		public SetUpgradeModeDescriptor Timeout(Time timeout) => Qs("timeout", timeout);
	}

	///<summary>Descriptor for StartDatafeed <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-start-datafeed.html</para></summary>
	public partial class StartDatafeedDescriptor : RequestDescriptorBase<StartDatafeedDescriptor, StartDatafeedRequestParameters, IStartDatafeedRequest>, IStartDatafeedRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningStartDatafeed;
		///<summary>/_ml/datafeeds/{datafeed_id}/_start</summary>
		///<param name = "datafeedId">this parameter is required</param>
		public StartDatafeedDescriptor(Id datafeedId): base(r => r.Required("datafeed_id", datafeedId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected StartDatafeedDescriptor(): base()
		{
		}

		// values part of the url path
		Id IStartDatafeedRequest.DatafeedId => Self.RouteValues.Get<Id>("datafeed_id");
	// Request parameters
	}

	///<summary>Descriptor for StopDatafeed <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-stop-datafeed.html</para></summary>
	public partial class StopDatafeedDescriptor : RequestDescriptorBase<StopDatafeedDescriptor, StopDatafeedRequestParameters, IStopDatafeedRequest>, IStopDatafeedRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningStopDatafeed;
		///<summary>/_ml/datafeeds/{datafeed_id}/_stop</summary>
		///<param name = "datafeedId">this parameter is required</param>
		public StopDatafeedDescriptor(Id datafeedId): base(r => r.Required("datafeed_id", datafeedId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected StopDatafeedDescriptor(): base()
		{
		}

		// values part of the url path
		Id IStopDatafeedRequest.DatafeedId => Self.RouteValues.Get<Id>("datafeed_id");
		// Request parameters
		///<summary>Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)</summary>		[Obsolete("Scheduled to be removed in 7.0, deprecated")]
		public StopDatafeedDescriptor AllowNoDatafeeds(bool? allownodatafeeds = true) => Qs("allow_no_datafeeds", allownodatafeeds);
		///<summary>Whether to ignore if a wildcard expression matches no datafeeds. (This includes `_all` string or when no datafeeds have been specified)</summary>
		public StopDatafeedDescriptor AllowNoMatch(bool? allownomatch = true) => Qs("allow_no_match", allownomatch);
	}

	///<summary>Descriptor for UpdateDatafeed <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-datafeed.html</para></summary>
	public partial class UpdateDatafeedDescriptor<TDocument> : RequestDescriptorBase<UpdateDatafeedDescriptor<TDocument>, UpdateDatafeedRequestParameters, IUpdateDatafeedRequest>, IUpdateDatafeedRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningUpdateDatafeed;
		///<summary>/_ml/datafeeds/{datafeed_id}/_update</summary>
		///<param name = "datafeedId">this parameter is required</param>
		public UpdateDatafeedDescriptor(Id datafeedId): base(r => r.Required("datafeed_id", datafeedId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected UpdateDatafeedDescriptor(): base()
		{
		}

		// values part of the url path
		Id IUpdateDatafeedRequest.DatafeedId => Self.RouteValues.Get<Id>("datafeed_id");
		// Request parameters
		///<summary>Ignore if the source indices expressions resolves to no concrete indices (default: true)</summary>
		public UpdateDatafeedDescriptor<TDocument> AllowNoIndices(bool? allownoindices = true) => Qs("allow_no_indices", allownoindices);
		///<summary>Whether source index expressions should get expanded to open or closed indices (default: open)</summary>
		public UpdateDatafeedDescriptor<TDocument> ExpandWildcards(ExpandWildcards? expandwildcards) => Qs("expand_wildcards", expandwildcards);
		///<summary>Ignore indices that are marked as throttled (default: true)</summary>
		public UpdateDatafeedDescriptor<TDocument> IgnoreThrottled(bool? ignorethrottled = true) => Qs("ignore_throttled", ignorethrottled);
		///<summary>Ignore unavailable indexes (default: false)</summary>
		public UpdateDatafeedDescriptor<TDocument> IgnoreUnavailable(bool? ignoreunavailable = true) => Qs("ignore_unavailable", ignoreunavailable);
	}

	///<summary>Descriptor for UpdateFilter <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-filter.html</para></summary>
	public partial class UpdateFilterDescriptor : RequestDescriptorBase<UpdateFilterDescriptor, UpdateFilterRequestParameters, IUpdateFilterRequest>, IUpdateFilterRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningUpdateFilter;
		///<summary>/_ml/filters/{filter_id}/_update</summary>
		///<param name = "filterId">this parameter is required</param>
		public UpdateFilterDescriptor(Id filterId): base(r => r.Required("filter_id", filterId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected UpdateFilterDescriptor(): base()
		{
		}

		// values part of the url path
		Id IUpdateFilterRequest.FilterId => Self.RouteValues.Get<Id>("filter_id");
	// Request parameters
	}

	///<summary>Descriptor for UpdateJob <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html</para></summary>
	public partial class UpdateJobDescriptor<TDocument> : RequestDescriptorBase<UpdateJobDescriptor<TDocument>, UpdateJobRequestParameters, IUpdateJobRequest>, IUpdateJobRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningUpdateJob;
		///<summary>/_ml/anomaly_detectors/{job_id}/_update</summary>
		///<param name = "jobId">this parameter is required</param>
		public UpdateJobDescriptor(Id jobId): base(r => r.Required("job_id", jobId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected UpdateJobDescriptor(): base()
		{
		}

		// values part of the url path
		Id IUpdateJobRequest.JobId => Self.RouteValues.Get<Id>("job_id");
	// Request parameters
	}

	///<summary>Descriptor for UpdateModelSnapshot <para>https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-snapshot.html</para></summary>
	public partial class UpdateModelSnapshotDescriptor : RequestDescriptorBase<UpdateModelSnapshotDescriptor, UpdateModelSnapshotRequestParameters, IUpdateModelSnapshotRequest>, IUpdateModelSnapshotRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningUpdateModelSnapshot;
		///<summary>/_ml/anomaly_detectors/{job_id}/model_snapshots/{snapshot_id}/_update</summary>
		///<param name = "jobId">this parameter is required</param>
		///<param name = "snapshotId">this parameter is required</param>
		public UpdateModelSnapshotDescriptor(Id jobId, Id snapshotId): base(r => r.Required("job_id", jobId).Required("snapshot_id", snapshotId))
		{
		}

		///<summary>Used for serialization purposes, making sure we have a parameterless constructor</summary>
		[SerializationConstructor]
		protected UpdateModelSnapshotDescriptor(): base()
		{
		}

		// values part of the url path
		Id IUpdateModelSnapshotRequest.JobId => Self.RouteValues.Get<Id>("job_id");
		Id IUpdateModelSnapshotRequest.SnapshotId => Self.RouteValues.Get<Id>("snapshot_id");
	// Request parameters
	}

	///<summary>Descriptor for ValidateJob <para>https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html</para></summary>
	public partial class ValidateJobDescriptor<TDocument> : RequestDescriptorBase<ValidateJobDescriptor<TDocument>, ValidateJobRequestParameters, IValidateJobRequest>, IValidateJobRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningValidateJob;
	// values part of the url path
	// Request parameters
	}

	///<summary>Descriptor for ValidateDetector <para>https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html</para></summary>
	public partial class ValidateDetectorDescriptor<TDocument> : RequestDescriptorBase<ValidateDetectorDescriptor<TDocument>, ValidateDetectorRequestParameters, IValidateDetectorRequest>, IValidateDetectorRequest
	{
		internal override ApiUrls ApiUrls => ApiUrlsLookups.MachineLearningValidateDetector;
	// values part of the url path
	// Request parameters
	}
}